import Vue from 'vue'
import Router from 'vue-router'
import Home from './views/Home.vue'
import Login from './views/login.vue'
import User from './views/user/user.vue'
import UserInfo from './views/user/userInfo.vue'
import Role from './views/role/role.vue'
import Menu from './views/menu/menu.vue'
import Project from './views/project/project.vue'
import Record from './views/record/record.vue'
import Logs from './views/logs/loginLogs.vue'
import Combo from './views/combo/combo.vue'
import Rotation from './views/rotation/rotation.vue'

// import show from './components/show.vue'
Vue.use(Router)

export default new Router({
  mode: 'history',
  base: process.env.BASE_URL,
  routes: [
    {
      path: '/',
      name: 'home',
      component: Home,
      children: [
      // {
      //   path: '/show/:id',
      //   name: 'show',
      //   component: show,
      // },

      //用户管理
      {
        path: '/user',
        name: 'user',
        component: User,
      },
      //角色管理
      {
        path: '/role',
        name: 'role',
        component: Role,
      },      
      //菜单管理
      {
        path: '/menu',
        name: 'menu',
        component: Menu,
      },
      //项目详情
      {
        path: '/project',
        name: 'project',
        component: Project,
      },
      //套餐详情
      {
        path: '/combo',
        name: 'combo',
        component: Combo,
      },
      //预约记录
      {
        path: '/record',
        name: 'record',
        component: Record,
      },
      //登录日志
      {
        path: '/loginLogs',
        name: 'loginLogs',
        component: Logs,
      },
      //轮播管理
      {
        path: '/rotation',
        name: 'rotation',
        component: Rotation,
      },
      //个人信息
      {
        path: '/userInfo',
        name: 'userInfo',
        component: UserInfo,
      }
      
    ]
    },
    {
      path: '/login',
      name: 'login',
      component: Login
    }
  ]
})
